unit UnModule;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, StdCtrls, DBCtrls, ExtCtrls, Mask,UnDataModule,
  DB;

type
  TModuleBeheer = class(TForm)
    Panel1: TPanel;
    DBLookupComboBox3: TDBLookupComboBox;
    DBLookupComboBox2: TDBLookupComboBox;
    DBEdit1: TDBEdit;
    Label3: TLabel;
    Label2: TLabel;
    Label1: TLabel;
    Label11: TLabel;
    Panel2: TPanel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    DBEdit2: TDBEdit;
    DBEdit3: TDBEdit;
    DBEdit4: TDBEdit;
    DBEdit5: TDBEdit;
    DBEdit6: TDBEdit;
    DBEdit7: TDBEdit;
    DBLookupComboBox1: TDBLookupComboBox;
    DBLookupComboBox4: TDBLookupComboBox;
    DBLookupComboBox5: TDBLookupComboBox;
    DBLookupComboBox6: TDBLookupComboBox;
    DBLookupComboBox7: TDBLookupComboBox;
    DBLookupComboBox8: TDBLookupComboBox;
    Label12: TLabel;
    Panel3: TPanel;
    DBGrid1: TDBGrid;
    DBNavigator1: TDBNavigator;
    Label13: TLabel;
    Panel4: TPanel;
    Label14: TLabel;
    Label15: TLabel;
    Button1: TButton;
    Dsbeheermodule: TDataSource;
    DsBeheerSensorTypes: TDataSource;
    DsBeheerModuleConfiguratie: TDataSource;
    DsOnderzoekBeheer: TDataSource;
    DsLokatieBeheer: TDataSource;
    Label16: TLabel;
    Label17: TLabel;
    Label18: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Label15Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    aDmDataSets : TDmDataSets;
  public
    property DmDataSets : TDmDataSets read aDmDataSets write aDmDataSets;
  end;

var
  ModuleBeheer: TModuleBeheer;

implementation

{$R *.dfm}

procedure TModuleBeheer.Button1Click(Sender: TObject);
begin
  close;
end;

procedure TModuleBeheer.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  if DmDataSets.CdsModulebeheer.State in [dsEdit,dsInsert] then
  begin
    if MessageDlg('Wijzigingen opslaan?',mtConfirmation,mbYesNo,0) = mrOk then
    begin
      DmDataSets.CdsModulebeheer.Post;
      DmDataSets.CdsModulebeheer.Refresh;
    end;
  end;
  Action := caFree;
end;

procedure TModuleBeheer.Label15Click(Sender: TObject);
begin
  showmessage('Functionaliteit nog niet geimplemnteerd');
end;

end.
